IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SrvrInstncSchedJobMSSQL]') AND type in (N'U'))
BEGIN
     DROP TABLE [dbo].[SrvrInstncSchedJobMSSQL]
END
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SrvrInstncSchedJobMSSQL](
     [SrvrInstncId] [int] NOT NULL,
     [SrvrInstncSchedJobId] [int] NOT NULL,
     [StartDt] [datetime] NOT NULL,
     [EndDt] [datetime] NOT NULL,
     [CurrentRecordFlag] [tinyint] NOT NULL CONSTRAINT [DF_SrvrInstncSchedJobMSSQL_CurrentRecordFlag] DEFAULT ((0)),
     [PackageExecutionId] [bigint] NOT NULL,
     [JobDeletedFlag] [tinyint] NOT NULL CONSTRAINT [DF_SrvrInstncSchedJobMSSQL_JobDeletedFlag] DEFAULT ((0)),
     [JobIdentifier] [varchar](40) NOT NULL,
     [JobName] [varchar](128) NOT NULL,
     [JobEnabledFlag] [tinyint] NOT NULL,
     [JobDescription] [varchar](1024) NOT NULL CONSTRAINT [DF_SrvrInstncSchedJobMSSQL_JobDescription] DEFAULT (''),
     [OwnerName] [varchar](128) NOT NULL,
     [CategoryId] [int] NOT NULL,
     [CategoryName] [varchar](128) NOT NULL,
     [StartStepId] [int] NOT NULL,
     [NotifyLevelEventlogDesc] [varchar](30) NOT NULL,
     [NotifyLevelEmailDesc] [varchar](30) NOT NULL,
     [NotifyLevelNetsendDesc] [varchar](30) NOT NULL,
     [NotifyLevelPageDesc] [varchar](30) NOT NULL,
     [NotifyEmailOperator] [varchar](128) NOT NULL,
     [NotifyNetsendOperator] [varchar](128) NOT NULL,
     [NotifyPageOperator] [varchar](128) NOT NULL,
     [CrDt] [datetime] NOT NULL,
     [ModDt] [datetime] NOT NULL,
     [VersionNumber] [int] NOT NULL,
     CONSTRAINT [PK_SrvrInstncSchedJobMSSQL] PRIMARY KEY CLUSTERED ( [SrvrInstncId] ASC, [SrvrInstncSchedJobId] ASC, [StartDt] ASC )
) ON [PRIMARY]
GO

SET ANSI_PADDING OFF
GO
